<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class UserCouponModel extends Model
{
    protected $table = 'user_coupons';

    public const UNUSED = 0;  // 末使用
    public const USED = 1;    // 已经使用

    public const UNUSED_NAME = 'unused';
    public const USED_NAME = 'used';


    //protected $dateFormat = 'U';
    protected $fillable = [
        'coupon_id',
        'code',
        'user_id',
        'coupon_group_id',
        'used',
        'last_used_at',
    ];

    protected $dates = ['last_used_at'];
}
